import 'https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js';
class Nb {
    constructor() {

    }
    init() {
        this.rdenum()
    }
    rdenum() {
        $.ajax({
            url: ' http://localhost/WWW.GOME.COM.CN/zkl/interface/php/index.red.php',
            dataType: 'json'
        }).then(function(resDate) {
            console.log(resDate);
            let str = '';
            $.each(resDate, function(i, v) {
                str += `
                <li>
                    <a href='./details.html?sid=${v.sid}'>
                    <img src=${v.url} alt=""/>
                    <p>${v.title}</p>
                    <p>¥${v.price}</p>
                    </a>
                </li>     
                `
            });

            $('.love-bottom .list').html(str);
        })

    }
}
export {
    Nb
}